package xkp.lesson.staticproxy;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;


@Data
@AllArgsConstructor
@NoArgsConstructor
@Accessors(chain = true)
public class ProxyShop implements Shopping, Driving {
    private Shopping shopping;
    private Driving driver;

    @Override
    public void shop() {
        System.out.println("我可以帮你处理这些事情");
        shopping.shop();
    }

    @Override
    public void drive() {
        System.out.println("我可以帮你处理这些事情");
        driver.drive();
    }
}
